//
//  BaseInfoTableViewCell.m
//  marrymarry
//
//  Created by lsj on 16/9/22.
//  Copyright © 2016年 cf. All rights reserved.
//
#define JIANJU_Y 10
#define JIANJU_X 8
#define LABEL_MAXWIDTH 160
#import "BaseInfoTableViewCell.h"
@interface BaseInfoTableViewCell ()
{
    int _MaxLableWidth;
    int _currentLabelX;
    int _secondLabelX;
    int _hangCount;
    int _currentArrNum;
    int _beforeLabelWidth;
    int _beforeLabelHeight;
    int _cellHeight;
    int _JiBenCellHeight;
    int _JinJiCellHeight;

    NSMutableArray * labelArry;
    NSMutableArray * jibenLabelArry;
    NSMutableArray * jinjiLabelArry;
    NSMutableArray * imgViewArry;
}
@property (nonatomic,strong) NSMutableArray * dataArry;
@end
@implementation BaseInfoTableViewCell

-(NSMutableArray *)dataArry
{
    if (!_dataArry) {
        _dataArry = [NSMutableArray new];
    }
    return _dataArry;
}
- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

///基本资料的cell
-(CGFloat)loadJiBenInfoWithDic:(NSDictionary *)myDic
{
   
    if ([myDic count] != 0) {
        [self.dataArry removeAllObjects];
        NSMutableArray * newarry = [[NSMutableArray alloc]initWithArray:@[TALL_KEY,WORK_PLACE_KEY,WEIGHT_KEY,XINZUO_KEY,LOVE_HISTORY_KEY]];

        _currentLabelX = 0;
        _MaxLableWidth = ScreenWidth -120;
        for (int i = 0; i<newarry.count;i++) {
            if ([[NSString stringWithFormat:@"%@",DICT(newarry[i])] isEqualToString:@"(null)"]||[[NSString stringWithFormat:@"%@",DICT(newarry[i])] isEqualToString:@""]) {
            }else{
                [self.dataArry addObject:DICT(newarry[i])];
            }
        }
    
    _hangCount = 0;
    _currentArrNum = 0;
        
        if (!jibenLabelArry) {
            jibenLabelArry = [NSMutableArray new];
        }else
        {
            for (UILabel*label in jibenLabelArry) {
                [label removeFromSuperview];
            }
        }
        
    for (int j = 0; j<self.dataArry.count; j++) {
        if (_currentLabelX<_MaxLableWidth) {
            
            self.JiBenLabel = [[UILabel alloc]initWithFrame:CGRectMake(10,20,200,20)];
            
            NSString * tstring =[NSString stringWithFormat:@"  %@  ",self.dataArry[j]];
            
            self.JiBenLabel.numberOfLines =1;
            
            UIFont * tfont = [UIFont systemFontOfSize:14];
            
            self.JiBenLabel.font = tfont;
            
            self.JiBenLabel.lineBreakMode =NSLineBreakByTruncatingTail ;
            
            self.JiBenLabel.text = tstring ;
            [self.JiBenLabel setBackgroundColor:RGB(245, 245, 245)];
            
            [self addSubview:self.JiBenLabel];
            
            //高度估计文本大概要显示几行，宽度根据需求自己定义。 MAXFLOAT 可以算出具体要多高
            
            CGSize size =CGSizeMake(LABEL_MAXWIDTH,20);
            
            // label可设置的最大高度和宽度
//                CGSize size = CGSizeMake(300.f, MAXFLOAT);
            
            //    获取当前文本的属性
            
            NSDictionary * tdic = [NSDictionary dictionaryWithObjectsAndKeys:tfont,NSFontAttributeName,nil];
            
            //ios7方法，获取文本需要的size，限制宽度
            
            CGSize  actualsize =[tstring boundingRectWithSize:size options:NSStringDrawingUsesLineFragmentOrigin  attributes:tdic context:nil].size;
            
            // ios7之前使用方法获取文本需要的size，7.0已弃用下面的方法。此方法要求font，与breakmode与之前设置的完全一致
            //    CGSize actualsize = [tstring sizeWithFont:font constrainedToSize:size lineBreakMode:NSLineBreakByCharWrapping];
            //   更新UILabel的frame
            
            
            self.JiBenLabel.frame =CGRectMake(73+JIANJU_X+ _currentArrNum*JIANJU_X+_currentArrNum*_beforeLabelWidth,JIANJU_Y+JIANJU_Y*_hangCount+_beforeLabelHeight*_hangCount, actualsize.width, actualsize.height);
            self.JiBenLabel.textColor = [UIColor darkGrayColor];
            self.JiBenLabel.layer.cornerRadius = 8;
             self.JiBenLabel.clipsToBounds = YES;
            _beforeLabelWidth = actualsize.width;
            _beforeLabelHeight = actualsize.height;
            _currentLabelX = _currentLabelX + _currentArrNum*JIANJU_X+_currentArrNum*actualsize.width+actualsize.width;
            _currentArrNum ++;
            self.JiBenLabel.adjustsFontSizeToFitWidth = YES;
            
            if (j == self.dataArry.count -1) {
                _JiBenCellHeight = self.JiBenLabel.frame.origin.y+self.JiBenLabel.frame.size.height+20;
            }
            [jibenLabelArry addObject:self.JiBenLabel];
            
          
            
        }else
        {
            _currentLabelX = 0;
            _currentArrNum = 0;
            _hangCount ++;
            j=j-1;
            
        }
        
    }
      return _JiBenCellHeight;
    }else
    {
        return 50;
    }
    
}
///经济状况的cell
-(CGFloat)loadJinJiStatusWithDic:(NSDictionary *)myDic andCarStatusDic:(NSDictionary *)carDic andHouseStatusDic:(NSDictionary *)houseDic
{
    
    if ([myDic count] != 0) {
        [self.dataArry removeAllObjects];
        NSMutableArray * newarry = [[NSMutableArray alloc]initWithArray:@[EARN_MONEY_KEY,CAR_PRICE_KEY]];
        
        _currentLabelX = 0;
        _MaxLableWidth = ScreenWidth - 220;
        for (int i = 0; i<newarry.count;i++) {
            if ([[NSString stringWithFormat:@"%@",DICT(newarry[i])] isEqualToString:@"(null)"]||[[NSString stringWithFormat:@"%@",DICT(newarry[i])] isEqualToString:@""]) {
                [self.dataArry addObject:@"未填写"];
            }else{
                [self.dataArry addObject:DICT(newarry[i])];
            }
        }
        
    [self.dataArry addObject:[NSString stringWithFormat:@"房产证"]];
    [self.dataArry addObject:[NSString stringWithFormat:@"私家车认证"]];
    _hangCount = 0;
    _currentArrNum = 0;
        if (!jinjiLabelArry) {
            jinjiLabelArry = [NSMutableArray new];
        }else
        {
            for (UILabel*label in jinjiLabelArry) {
                [label removeFromSuperview];
            }
        }
        if (!imgViewArry) {
            imgViewArry = [NSMutableArray new];
        }else
        {
            for (UIImageView *imgview in imgViewArry) {
                [imgview removeFromSuperview];
            }
        }
        
    for (int j = 0; j<self.dataArry.count; j++) {
        if (_currentLabelX<_MaxLableWidth) {
            
            self.JinJiLabel = [[UILabel alloc]initWithFrame:CGRectMake(10,20,80,20)];
            
            NSString * tstring =[NSString stringWithFormat:@"  %@  ",self.dataArry[j]];
            
            self.JinJiLabel.numberOfLines =1;
            
            UIFont * tfont = [UIFont systemFontOfSize:14];
            
            self.JinJiLabel.font = tfont;
            
            self.JinJiLabel.lineBreakMode =NSLineBreakByTruncatingTail ;
            
            self.JinJiLabel.text = tstring ;
            [self.JinJiLabel setBackgroundColor:RGB(245, 245, 245)];
            
            [self addSubview:self.JinJiLabel];
            
            //高度估计文本大概要显示几行，宽度根据需求自己定义。 MAXFLOAT 可以算出具体要多高
            
            CGSize size =CGSizeMake(LABEL_MAXWIDTH,20);
            
            // label可设置的最大高度和宽度
            //                CGSize size = CGSizeMake(300.f, MAXFLOAT);
            
            //    获取当前文本的属性
            
            NSDictionary * tdic = [NSDictionary dictionaryWithObjectsAndKeys:tfont,NSFontAttributeName,nil];
            
            //ios7方法，获取文本需要的size，限制宽度
            
            CGSize  actualsize =[tstring boundingRectWithSize:size options:NSStringDrawingUsesLineFragmentOrigin  attributes:tdic context:nil].size;
            
            // ios7之前使用方法获取文本需要的size，7.0已弃用下面的方法。此方法要求font，与breakmode与之前设置的完全一致
            //    CGSize actualsize = [tstring sizeWithFont:font constrainedToSize:size lineBreakMode:NSLineBreakByCharWrapping];
            //   更新UILabel的frame
            
            CGRect myframe = CGRectMake(73+JIANJU_X+ _currentArrNum*JIANJU_X+_currentArrNum*_beforeLabelWidth,JIANJU_Y+JIANJU_Y*_hangCount+_beforeLabelHeight*_hangCount, actualsize.width, actualsize.height);
            self.JinJiLabel.frame = myframe;
            self.JinJiLabel.textColor = [UIColor darkGrayColor];
            self.JinJiLabel.layer.cornerRadius = 8;
            self.JinJiLabel.clipsToBounds = YES;
            NSLog(@"%f",self.JinJiLabel.frame.origin.y);
            if (j==2 || j == 3) {
                UIImageView * duiGouImgView = [UIImageView new];
                duiGouImgView.frame = CGRectMake(73+JIANJU_X+ _currentArrNum*JIANJU_X+_currentArrNum*_beforeLabelWidth+2+actualsize.width,JIANJU_Y+JIANJU_Y*_hangCount+_beforeLabelHeight*_hangCount-2, 20, 20);
                _beforeLabelWidth = actualsize.width + 22;
                if (j== 2) {
                    if ([houseDic[@"status"] intValue] == 2) {
                        duiGouImgView.image = [UIImage imageNamed:@"notp.png"];
                    }else if ([houseDic[@"status"] intValue] ==  0)
                    {
                        duiGouImgView.image = [UIImage imageNamed:@"notp.png"];
                    }else if  ([houseDic[@"status"] intValue] ==  1)
                    {
                        duiGouImgView.image = [UIImage imageNamed:@"yiRenZhen.png"];
                    }
                }else if (j ==3)
                {
                    if ([carDic[@"status"] intValue] == 2) {
                    duiGouImgView.image = [UIImage imageNamed:@"notp.png"];
                }else if ([carDic[@"status"] intValue] ==  0)
                {
                    duiGouImgView.image = [UIImage imageNamed:@"notp.png"];
                }else if  ([carDic[@"status"] intValue] ==  1)
                {
                    duiGouImgView.image = [UIImage imageNamed:@"yiRenZhen.png"];
                }
                    
                }
                
                [self addSubview:duiGouImgView];
                [imgViewArry addObject:duiGouImgView];
            }else{
                _beforeLabelWidth = actualsize.width;
            }
            _beforeLabelHeight = actualsize.height;
            _currentLabelX = _currentLabelX + _currentArrNum*JIANJU_X+_currentArrNum*actualsize.width+actualsize.width;
            _currentArrNum ++;
            if (j == self.dataArry.count -1) {
                _JinJiCellHeight = self.JinJiLabel.frame.origin.y+self.JinJiLabel.frame.size.height+20;
                NSLog(@"_JinJiCellHeight === %d",_JinJiCellHeight);
            }
            [jinjiLabelArry addObject:self.JinJiLabel];
        }
        else
        {
            _currentLabelX = 0;
            _currentArrNum = 0;
            _hangCount ++;
            j=j-1;
            
        }
        
    }
         return _JinJiCellHeight;
    }else{
        return 50;
    }
    
}

///择偶标准cell
-(CGFloat)loadZeOuInfoWithDic:(NSDictionary *)myDic
{
    NSLog(@"Mydic ===%@",myDic);
    if ([myDic count] != 0) {
        [self.dataArry removeAllObjects];
        NSMutableArray * newarry = [[NSMutableArray alloc]initWithArray:@[TALL_KEY,EARN_MONEY_KEY,MARRY_STATUS,WORK_KEY,STUDY_KEY,OLD_KEY]];
        
    
    _currentLabelX = 0;
    _MaxLableWidth = ScreenWidth -120;
        for (int i = 0; i<newarry.count;i++) {
            if ([[NSString stringWithFormat:@"%@",DICT(newarry[i])] isEqualToString:@"(null)"]||[[NSString stringWithFormat:@"%@",DICT(newarry[i])] isEqualToString:@""]) {
            }else{
                [self.dataArry addObject:DICT(newarry[i])];
            }
        }
    _hangCount = 0;
    _currentArrNum = 0;
        if (!labelArry) {
            labelArry = [NSMutableArray new];
        }else
        {
            for (UILabel*label in labelArry) {
                [label removeFromSuperview];
            }
        }
    for (int j = 0; j<self.dataArry.count; j++) {
        if (_currentLabelX<_MaxLableWidth) {
           self.zeOuLabel = [[UILabel alloc]initWithFrame:CGRectMake(10,20,200,20)];
            NSString * tstring =[NSString stringWithFormat:@"  %@  ",self.dataArry[j]];
            self.zeOuLabel.numberOfLines =1;
            UIFont * tfont = [UIFont systemFontOfSize:14];
            self.zeOuLabel.font = tfont;
            self.zeOuLabel.lineBreakMode =NSLineBreakByTruncatingTail ;
            self.zeOuLabel.text = tstring ;
            [self.zeOuLabel setBackgroundColor:RGB(245, 245, 245)];
            [self addSubview:self.zeOuLabel];
            //高度估计文本大概要显示几行，宽度根据需求自己定义。 MAXFLOAT 可以算出具体要多高
            CGSize size =CGSizeMake(LABEL_MAXWIDTH,20);
            
            // label可设置的最大高度和宽度
            //                CGSize size = CGSizeMake(300.f, MAXFLOAT);
            
            //    获取当前文本的属性
            
            NSDictionary * tdic = [NSDictionary dictionaryWithObjectsAndKeys:tfont,NSFontAttributeName,nil];
            
            //ios7方法，获取文本需要的size，限制宽度
            
            CGSize  actualsize =[tstring boundingRectWithSize:size options:NSStringDrawingUsesLineFragmentOrigin  attributes:tdic context:nil].size;
            
            // ios7之前使用方法获取文本需要的size，7.0已弃用下面的方法。此方法要求font，与breakmode与之前设置的完全一致
            //    CGSize actualsize = [tstring sizeWithFont:font constrainedToSize:size lineBreakMode:NSLineBreakByCharWrapping];
            //   更新UILabel的frame
            
            
            self.zeOuLabel.frame =CGRectMake(73+JIANJU_X+ _currentArrNum*JIANJU_X+_currentArrNum*_beforeLabelWidth,JIANJU_Y+JIANJU_Y*_hangCount+_beforeLabelHeight*_hangCount, actualsize.width, actualsize.height);
            self.zeOuLabel.textColor = [UIColor darkGrayColor];
            self.zeOuLabel.layer.cornerRadius = 8;
            self.zeOuLabel.clipsToBounds = YES;
            _beforeLabelWidth = actualsize.width;
            _beforeLabelHeight = actualsize.height;
            _currentLabelX = _currentLabelX + _currentArrNum*JIANJU_X+_currentArrNum*actualsize.width+actualsize.width;
            _currentArrNum ++;
            self.zeOuLabel.adjustsFontSizeToFitWidth = YES;
            if (j == self.dataArry.count -1) {
                _cellHeight = self.zeOuLabel.frame.origin.y+self.zeOuLabel.frame.size.height+20;
            }
            [labelArry addObject:self.zeOuLabel];
        }else
        {
            _currentLabelX = 0;
            _currentArrNum = 0;
            _hangCount ++;
            j=j-1;
            
        }
        
    }
        
    return _cellHeight;
    }else{
        return 50;
    }
    
}


-(CGFloat)loadHunYinGuanNianDic:(NSDictionary *)myDic
{
    NSLog(@"Mydic ===%@",myDic);
    if ([myDic count] != 0) {
        [self.dataArry removeAllObjects];
        NSMutableArray * newarry = [[NSMutableArray alloc]initWithArray:@[MARRY_WITH_CHILD_KEY,MARRY_MOVE_WITH_LOVE_KEY,MARRY_AFTER_HOME_WORK_KEY,MARRY_FAMILY_CLEAN_KEY]];
        
        
        _currentLabelX = 0;
        _MaxLableWidth = ScreenWidth -190;
        for (int i = 0; i<newarry.count;i++) {
            if ([[NSString stringWithFormat:@"%@",DICT(newarry[i])] isEqualToString:@"(null)"]||[[NSString stringWithFormat:@"%@",DICT(newarry[i])] isEqualToString:@""]) {
            }else{
                [self.dataArry addObject:DICT(newarry[i])];
            }
        }
        _hangCount = 0;
        _currentArrNum = 0;
        if (!labelArry) {
            labelArry = [NSMutableArray new];
        }else
        {
            for (UILabel*label in labelArry) {
                [label removeFromSuperview];
            }
        }
        for (int j = 0; j<self.dataArry.count; j++) {
            if (_currentLabelX<_MaxLableWidth) {
                self.zeOuLabel = [[UILabel alloc]initWithFrame:CGRectMake(10,20,200,20)];
                NSString * tstring =[NSString stringWithFormat:@"  %@  ",self.dataArry[j]];
                self.zeOuLabel.numberOfLines =1;
                UIFont * tfont = [UIFont systemFontOfSize:14];
                self.zeOuLabel.font = tfont;
                self.zeOuLabel.lineBreakMode =NSLineBreakByTruncatingTail ;
                self.zeOuLabel.text = tstring ;
                [self.zeOuLabel setBackgroundColor:RGB(245, 245, 245)];
                [self addSubview:self.zeOuLabel];
                //高度估计文本大概要显示几行，宽度根据需求自己定义。 MAXFLOAT 可以算出具体要多高
                CGSize size =CGSizeMake(LABEL_MAXWIDTH,20);
                
                // label可设置的最大高度和宽度
                //                CGSize size = CGSizeMake(300.f, MAXFLOAT);
                
                //    获取当前文本的属性
                
                NSDictionary * tdic = [NSDictionary dictionaryWithObjectsAndKeys:tfont,NSFontAttributeName,nil];
                
                //ios7方法，获取文本需要的size，限制宽度
                
                CGSize  actualsize =[tstring boundingRectWithSize:size options:NSStringDrawingUsesLineFragmentOrigin  attributes:tdic context:nil].size;
                
                // ios7之前使用方法获取文本需要的size，7.0已弃用下面的方法。此方法要求font，与breakmode与之前设置的完全一致
                //    CGSize actualsize = [tstring sizeWithFont:font constrainedToSize:size lineBreakMode:NSLineBreakByCharWrapping];
                //   更新UILabel的frame
                
                
                self.zeOuLabel.frame =CGRectMake(73+JIANJU_X+ _currentArrNum*JIANJU_X+_currentArrNum*_beforeLabelWidth,JIANJU_Y+JIANJU_Y*_hangCount+_beforeLabelHeight*_hangCount, actualsize.width, actualsize.height);
                self.zeOuLabel.textColor = [UIColor darkGrayColor];
                self.zeOuLabel.layer.cornerRadius = 8;
                self.zeOuLabel.clipsToBounds = YES;
                _beforeLabelWidth = actualsize.width;
                _beforeLabelHeight = actualsize.height;
                _currentLabelX = _currentLabelX + _currentArrNum*JIANJU_X+_currentArrNum*actualsize.width+actualsize.width;
                _currentArrNum ++;
                self.zeOuLabel.adjustsFontSizeToFitWidth = YES;
                if (j == self.dataArry.count -1) {
                    _cellHeight = self.zeOuLabel.frame.origin.y+self.zeOuLabel.frame.size.height+20;
                }
                [labelArry addObject:self.zeOuLabel];
            }else
            {
                _currentLabelX = 0;
                _currentArrNum = 0;
                _hangCount ++;
                j=j-1;
                
            }
            
        }
        
        return _cellHeight;
    }else{
        return 50;
    }

}

-(CGFloat)loadQinMiShiJiaoDic:(NSDictionary *)myDic andIndexPath:(NSIndexPath *)indexPath
{
    NSLog(@"Mydic ===%@",myDic);
    if ([myDic count] != 0) {
        [self.dataArry removeAllObjects];
        NSMutableArray * newarry = [NSMutableArray new];
        
        if (indexPath.row == 1) {
            newarry = [[NSMutableArray alloc]initWithArray:@[THINK_YOUR_SEX_KEY,FIND_OTHER_PEOPLE_MUST_BE_KEY]];
        }else if ( indexPath.row ==2){
            newarry = [[NSMutableArray alloc]initWithArray:@[FIRST_MEET_WHOPAY_KEY,FIRST_MEET_LIKEPLACE_KEY,FIRST_MEET_ROMANCE_KEY]];
        }
        
        _currentLabelX = 0;
        _MaxLableWidth = ScreenWidth -190;
        for (int i = 0; i<newarry.count;i++) {
            if ([[NSString stringWithFormat:@"%@",DICT(newarry[i])] isEqualToString:@"(null)"]||[[NSString stringWithFormat:@"%@",DICT(newarry[i])] isEqualToString:@""]) {
            }else{
                [self.dataArry addObject:DICT(newarry[i])];
            }
        }
        _hangCount = 0;
        _currentArrNum = 0;
        if (!labelArry) {
            labelArry = [NSMutableArray new];
        }else
        {
            for (UILabel*label in labelArry) {
                [label removeFromSuperview];
            }
        }
        for (int j = 0; j<self.dataArry.count; j++) {
            if (_currentLabelX<_MaxLableWidth) {
                self.zeOuLabel = [[UILabel alloc]initWithFrame:CGRectMake(10,20,200,20)];
                NSString * tstring =[NSString stringWithFormat:@"  %@  ",self.dataArry[j]];
                self.zeOuLabel.numberOfLines =1;
                UIFont * tfont = [UIFont systemFontOfSize:14];
                self.zeOuLabel.font = tfont;
                self.zeOuLabel.lineBreakMode =NSLineBreakByTruncatingTail ;
                self.zeOuLabel.text = tstring ;
                [self.zeOuLabel setBackgroundColor:RGB(245, 245, 245)];
                [self addSubview:self.zeOuLabel];
                //高度估计文本大概要显示几行，宽度根据需求自己定义。 MAXFLOAT 可以算出具体要多高
                CGSize size =CGSizeMake(LABEL_MAXWIDTH,20);
                
                // label可设置的最大高度和宽度
                //                CGSize size = CGSizeMake(300.f, MAXFLOAT);
                
                //    获取当前文本的属性
                
                NSDictionary * tdic = [NSDictionary dictionaryWithObjectsAndKeys:tfont,NSFontAttributeName,nil];
                
                //ios7方法，获取文本需要的size，限制宽度
                
                CGSize  actualsize =[tstring boundingRectWithSize:size options:NSStringDrawingUsesLineFragmentOrigin  attributes:tdic context:nil].size;
                
                // ios7之前使用方法获取文本需要的size，7.0已弃用下面的方法。此方法要求font，与breakmode与之前设置的完全一致
                //    CGSize actualsize = [tstring sizeWithFont:font constrainedToSize:size lineBreakMode:NSLineBreakByCharWrapping];
                //   更新UILabel的frame
                
                
                self.zeOuLabel.frame =CGRectMake(73+JIANJU_X+ _currentArrNum*JIANJU_X+_currentArrNum*_beforeLabelWidth,JIANJU_Y+JIANJU_Y*_hangCount+_beforeLabelHeight*_hangCount, actualsize.width, actualsize.height);
                self.zeOuLabel.textColor = [UIColor darkGrayColor];
                self.zeOuLabel.layer.cornerRadius = 8;
                self.zeOuLabel.clipsToBounds = YES;
                _beforeLabelWidth = actualsize.width;
                _beforeLabelHeight = actualsize.height;
                _currentLabelX = _currentLabelX + _currentArrNum*JIANJU_X+_currentArrNum*actualsize.width+actualsize.width;
                _currentArrNum ++;
                self.zeOuLabel.adjustsFontSizeToFitWidth = YES;
                if (j == self.dataArry.count -1) {
                    _cellHeight = self.zeOuLabel.frame.origin.y+self.zeOuLabel.frame.size.height+20;
                }
                [labelArry addObject:self.zeOuLabel];
            }else
            {
                _currentLabelX = 0;
                _currentArrNum = 0;
                _hangCount ++;
                j=j-1;
                
            }
            
        }
        
        return 70;
    }else{
        return 50;
    }

}




@end
